import http from '@/utils/axios';

// 获取列表数据
export const getArticleCateListApi = (params?: any) => {
    return http({
        method: 'get',
        url: '/article_cate/index',
        params,
    });
};

// 获取数据
export const getArticleCateInfoApi = (id: number) => {
    return http({
        method: 'GET',
        url: `/article_cate/read/${id}`,
    });
};

// 新增数据
export const saveArticleCateInfoApi = (data: any) => {
    return http({
        method: 'POST',
        url: `/article_cate/save`,
        data,
    });
};

// 更新数据
export const updateArticleCateInfoApi = (id: number, data: any) => {
    return http({
        method: 'PUT',
        url: `/article_cate/update/${id}`,
        data,
    });
};

// 删除数据
export const deleteArticleCateInfoApi = (id: number) => {
    return http({
        method: 'DELETE',
        url: `/article_cate/delete/${id}`,
    });
};